/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package model.game.night.plugin;

import model.game.GameInterface;
import model.game.night.MonsterWave;

/**
 * First wave (example only actually)
 * length: 20 actions
 * monsters :
 * appearance | monster name
 * 5          | Pig
 */
public class Wave002 extends MonsterWave {

  /**
   * Constructor
   */
  public Wave002(GameInterface game) {
    super(game);
  }

  @Override
  public void spawnMonsterAtCurrentTime() {
    if (time_elapsed_ == 1) {
      game_.getCreatures().getMonsters().spawnMonsterFromName(
              "Pig",
              game_.getMaps().getField().getCellAt(8, 10));
    }
    if (time_elapsed_ == 2) {
      game_.getCreatures().getMonsters().spawnMonsterFromName(
              "Pig",
              game_.getMaps().getField().getCellAt(8, 10));
    }
    if (time_elapsed_ == 3) {
      game_.getCreatures().getMonsters().spawnMonsterFromName(
              "Pig",
              game_.getMaps().getField().getCellAt(8, 10));
    }
    if (time_elapsed_ == 7) {
      game_.getCreatures().getMonsters().spawnMonsterFromName(
              "Pig",
              game_.getMaps().getField().getCellAt(8, 10));
    }
    if (time_elapsed_ == 9) {
      game_.getCreatures().getMonsters().spawnMonsterFromName(
              "Pig",
              game_.getMaps().getField().getCellAt(8, 10));
    }
  }

  @Override
  public int getOrder() {
    return 2;
  }

  @Override
  public void endNight() {
    game_.getCreatures().getMonsters().removeAllMonsters();
  }

  @Override
  public int getNightLength() {
    return 60;
  }

}
